{% extends 'base.html' %}
{% load staticfiles %}

{% block content %}
    {% include 'app_User/index_Carousel.html' %}
    <div class="container">
        <div class="row">
            <div class="col-4">
                <div class="card" style="width: 18rem;">
                    <img src="{{ MEDIA_URL }}{{ret.imgurl}}" class="card-img-top" alt="...">
                    <div class="card-body">
                        <h5 class="card-title">Card title</h5>
                        <p class="card-text">Some quick example text to build on the card title and make up the bulk of
                            the card's content.</p>
                    </div>
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item">id码{{ ret.id }}</li>
                        <li class="list-group-item">状态码{{ ret.code }}</li>
                        <li class="list-group-item">用户名{{ ret.username }}</li>
                        <li class="list-group-item">真实姓名{{ ret.realName }}</li>
                        <li class="list-group-item">用户性别{{ ret.sex }}</li>
                        <li class="list-group-item">用户身份证号{{ ret.sfz }}</li>
                        <li class="list-group-item"></li>
                    </ul>
                    <div class="card-body">
                        <a href="#" class="card-link">Card link</a>
                        <a href="#" class="card-link">Another link</a>
                    </div>
                </div>


            </div>
            <div class="col-8">
                {% if not comment_QuSet %}
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text">给他评论</span>
                        </div>
                        <textarea class="form-control" aria-label="With textarea"></textarea>
                        <div class="input-group-append">
                            <button class="btn btn-outline-secondary" type="button">Button</button>
                        </div>
                    </div>
                {% endif %}


                {% if comment_QuSet %}
                    <div class="accordion" id="accordionExample">
                        {% for i in comment_QuSet %}
                            <div class="card">
                                <div class="card-header" id="headingOne">
                                    <h2 class="mb-0">
                                        <button class="btn btn-link btn-block text-left" type="button"
                                                data-toggle="collapse" data-target="#collapseOne" aria-expanded="true"
                                                aria-controls="collapseOne">
                                            {{ i.commentMakerId.realName }}给你留了一条信息
                                        </button>

                                    </h2>
                                </div>

                                <div id="collapseOne" class="collapse show" aria-labelledby="headingOne"
                                     data-parent="#accordionExample">
                                    <div class="card-body">

                                        <p>{{ i.comment }}</p>
                                        <small>时间:{{ i.commentTime }}</small>
                                        <a href="?pageid={{ i.commentMakerId.id }}&token={{ token }}"
                                           class="active">进入{{ i.commentMakerId.realName }}的主页</a>

                                    </div>
                                </div>
                            </div>
                        {% endfor %}
                    </div>

                {% endif %}


            </div>
        </div>
    </div>








    {#{% include 'app_User/xxxx.html' %}#}
    {#    <a class="btn btn-default" href="{% url 'clearzhizhutxt' %}" role="button">清除蜘蛛访问记录</a>#}
    {#    <a class="btn btn-default" href="{% url 'cleartxt' %}" role="button">清除用户访问记录</a>#}

{% endblock %}
{% block script %}
    <script type="text/javascript">
        $('#userMainName').text('{{ ret.realName }}主页');


    </script>
{% endblock %}>